<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改角色信息</title>
<%@ include file="/app/includes/header.jsp"%>
	<script type="text/javascript">
		function updateDict(){
			$('#dictForm').submit();
		}
	</script>
</head>
<body>
	<div id="panel" class="easyui-panel" title="修改角色信息"
			icon="icon-save" collapsible="true" style="padding: 10px;">
		<form id="dictForm" action="<%=request.getContextPath()%>/system/dict/updateDict.action" method="post" >
			<table class="table_form">
			<tr>
				<td>
					标识:
				</td>
				<td>
					<input id="id" name="id"  type="text" value="${dict.id}" 
						readonly="readonly"></input>
				</td>
				<td >
				</td>
			</tr>
			<tr>
				<td>
					值:
				</td>
				<td>
					<input id="value" name="value" type="text" value="${dict.value}"></input>
				</td>
				<td>
					<div id="valueTip"></div>
				</td>
			</tr>
			<tr>
				<td>
					拼音:
				</td>
				<td>
					<input id="pinyin" name="pinyin" type="text" value="${dict.pinyin}"></input>
				</td>
				<td>
					<div id="pinyinTip" ></div>
				</td>
			</tr>
			<tr>
				<td>
					类型:
				</td>
				<td>
					<input id="type" name="type" type="text" value ="${dict.type}"></input>
				</td>
				<td>
					<div id="typeTip" ></div>
				</td>
			</tr>
			<tr>
				<td colspan="3">
					<div style="padding: 10px;" >
						<a href="#"  class="easyui-linkbutton" iconCls="icon-ok" 
								onclick="updateDict()">确定</a>
						<a href="javascript:history.back(-1)" class="easyui-linkbutton"  
								iconCls="icon-cancel">取消</a>
					</div>
				</td>
			</tr>
			</table>
		</form>
	</div>
</body>
	<script type="text/javascript">
		$(document).ready(function(){
		$.formValidator.initConfig({formid:"roleForm"});
		$("#value").formValidator({
			onshow:"请输入值",
			onfocus:"请正确填写值，例如：1",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"值不能为空！"});
		$("#pinyin").formValidator({
			onshow:"请输入拼音",
			onfocus:"请正确填写拼音，例如：pinyin",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"拼音不能为空！"});
		$("#type").formValidator({
			onshow:"请输入类型",
			onfocus:"请正确填写类型，例如：用户类型",
			oncorrect:"正确"})
			.inputValidator({min:1,onerror:"类型不能为空！"});
		});
	</script>
</html>